package entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="SUBJECTS")
@NamedQuery(name="Subjects.findAll", query="SELECT s FROM Subjects s")
public class Subjects implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="SUB_ID")
	private Long id;
	@Column(name="SUB_NAME", nullable = false, length=100, unique=true)
	private String name;
	@Column(name="SUB_CODE", nullable = false, length=10, unique=true)
	private String code;
	@Column(name="SUB_TOTAL_HOURS", nullable = false)
	private Integer totalHours;
		
	public Subjects() {}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Integer getTotalHours() {
		return totalHours;
	}

	public void setTotalHours(Integer totalHours) {
		this.totalHours = totalHours;
	}
   
}
